Image Map HTML Tags
There are three HTML tags used in creating client side image maps:
Whether to Use .MAP Files or Not?
Client side image maps really only contain the MAP and AREA tags. The Spider Writer Image Mapper can load and save .MAP files that contain only those two tags. When you want to use the image map on an image in another HTML document, you use the USEMAP attribute of the IMG tag to point to the URL where the .MAP file is located. When you browse the HTML document and the IMG tag is interpreted, the browser will look up the image map information in the file pointed to by the USEMAP attribute and will generate the image map from this.
The problem with using .MAP files is that Netscape does not look into other files for image map information and will never load a .MAP file. Therefore, it is better to provide a NAME attribute to the MAP tag of your image map and place the image map code directly in the main HTML document. This way, you can reference the image map in the USEMAP attribute of an IMG tag with a value such as USEMAP="#imagemapname". This method is supported by all browsers.
Image Map Example Source
The following example shows the necessary code to display an image named testimage.gif with two hotspot areas:
<IMG src="testimage.gif" USEMAP="#myimagemap">
<MAP NAME="myimagemap">
<AREA SHAPE="Rect" COORDS="19, 27, 119, 67">
<AREA SHAPE="Circle" COORDS="73, 131, 38">
</MAP>